

G_CLASSPATH = -classpath ../lib/raceway.jar:../lib/ssfnet.jar:./players:$(CLASSPATH)
G2_CLASSPATH = -classpath ../../lib/raceway.jar:../../lib/ssfnet.jar:../../lib/cernlite.jar:../../lib/regexp.jar:../../lib/plot.jar:../../lib/plotapplication.jar:../players:$(CLASSPATH)

G1_CLASSPATH = -classpath ../../hitest.jar:.:..:$(CLASSPATH)
G4_CLASSPATH = -classpath ../../../../lib/raceway.jar:../../../../lib/ssfnet.jar:../../hitest.jar:.:..:$(CLASSPATH)

LARGE = -mx148M -ms148M

all:
	@echo Valid make targets are: 
	@echo  bgp-view, impulse, tcp, usa, worm, bj

makePlayers:
	javac $(G_CLASSPATH) players/*.java

bgp-view: makePlayers

	(cd bgp; java $(G2_CLASSPATH) \
	  RacewayViewer f1.dml \
	    -s f1.dat.0 -p pulsePlayer -start 30 -stop 10000)

impulse: makePlayers
	(cd ring; java  $(G2_CLASSPATH) \
	  RacewayViewer ring2.dml ringdict.dml \
	     -s bigring.dat.0 -p impulsePlayer)


tcp: makePlayers
	(cd tcp1; java -Xms64M -Xmx256M $(G2_CLASSPATH) \
	  RacewayViewer tcp_self_sim_demo.dml \
		-s inf_n20_len1k.dat -p droptailPlayer)

usa:
	(cd usa1; java -Xms64M -Xmx256M $(G2_CLASSPATH) \
	  RacewayViewer demo_usa.dml usa1.dml dictionary.dml networks.dml)

worm:
	(javac $(G_CLASSPATH) wormAttack/worm_model/WormAnimPlayer.java) 

	(cd wormAttack/worm_model; java -Xms64M -Xmx256M $(G4_CLASSPATH) \
	  RacewayViewer sim75.dml sim75_netasst.dml \
		-s sim75.dat -p WormAnimPlayer)


clean:
	 - find ./ -name '*.class' -exec rm -f {} \; -print
	 - (cd linkpulses && $(MAKE) clean)

